package priv.yiyuan.example.design.visitor;

/**
 * 报表访问者工厂
 *
 * @author YiYuan
 * @data 2025/8/4
 * @apoNote
 */
public class ReportVisitorFactory {

    public static ReportVisitor createVisitor(String reportType) {

        switch (reportType.toLowerCase()) {

            case "pdf":
                return new PdfReportVisitor();
            case "excel":
                return new ExcelReportVisitor();

            default:
                throw new IllegalArgumentException("Unknown report type: " + reportType);

        }
    }
}
